<%-- 
    Document   : index
    Created on : 05/05/2010, 18:58:57
    Author     : 710930
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">


<%
String menu = (String) request.getSession().getAttribute("role");

if(menu.equals("admin")){
    menu = "template/menuadmin.jsp";
}
else if(menu.equals("cliente")){
    menu = "template/menucliente.jsp";
}

String pag = request.getParameter("pg");

if(pag == null) {
    pag = "categoria";
}

pag = "listar/" + pag + ".jsp";

%>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>

        <div id="all">
            <div id="header">
                <jsp:include page="template/header.jsp"></jsp:include>
            </div>
            <div id="body">
                <div id="left_menu">
                    <jsp:include page="<%=menu%>"></jsp:include>
                </div>
                    <div id="content"> <jsp:include page="<%=pag%>"></jsp:include> </div>
            </div>
        </div>

    </body>
</html>
